/**
 * @Company: 北京慧点科技有限公司 | www.smartdot.com.cn
 * @Copyright 1998-2020 © Smartdot Technologies Co., Ltd.
 */
package com.springlearn.zhoufei.other.spring.demo1;

import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

/**
 * 描述该类- JPA
 *
 * @author <a href="mailto:zhoufei@smartdot.com.cn">zhoufei</a>
 * @class: Test
 * @date 2020/9/18 20:09
 * @Verson 1.0 -2020/9/18 20:09
 * @see
 */
public class Test2 {
    
    public static String pathHello = "./other\\Hello.xml";
    
    public static void main(String[] args) {
        // XmlBeanFactory 去生成工厂bean
        // ClassPathResource 去加载bean配置文件。
        // 通过配置文件中的beanID来返回一个真正的对象
        XmlBeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource(pathHello));
        Hello hello = (Hello) beanFactory.getBean("hello");
        hello.sayHello();
    }
}